<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<base href="{{ CurrentUrl }}">
{% include 'meta.twig' %} 
{% include 'scripts.twig' %}
{% include 'footer.inc' ignore missing %}
<title>{{ ServiceName }}{% block title %}{% endblock %}</title>
</head>
<body {% if vocab is defined %}class="vocab-{{ vocab_id }}-background"{% endif %}>

  <div id="wrapper">

    <!-- Topbar -->
    <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
      {% include 'topbar.twig' %}
      <div id="header-bar-content" class="vocab-{{ vocab_id }}">
        <div class="headerbar-left collapse navbar-collapse">
        {% if vocab is defined %}
          {% block headernav %}
          <ul class="nav nav-tabs">
            <li><a href="{{ path_fix }}{{ vocab_id }}/{{ lang }}/index">Aakkosellinen</a></li>
            <li><a href="#" id="hier-trigger">{% trans "Hier-nav" %}</a></li>
            {% if vocab.hasGlobalCollections %}
            <li><a href="{{ path_fix }}{{ vocab_id }}/{{ lang }}/collections">Ryhmät</a></li>
            {% else %}
            {% endif %}
          </ul>
          {% endblock %}
        {% endif %}
        </div>
        {% if vocab_id != 'About' and vocab_id != 'Feedback' %}
        <div class="headerbar-right"><span class="search-vocab-text collapse">{% if global_search is defined %}{% trans "Search from all vocabularies:" %}{% elseif front_page %}{% trans "Search from all vocabularies:" %}{% else %}{% trans "Search within this vocabulary:" %}{% endif %}</span>
          <form class="navbar-form navbar-left" role="search" name="text-search" action="{{ path_fix }}{% if vocab_id is defined %}{{ vocab_id }}/{% endif %}{{ lang }}/search">
            <input style="display: none" name="lang" value="{{ lang }}" id="lang-input">
            <div class="input-group">
              <div class="input-group-btn">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="lang-dropdown-toggle">{% trans "Language literal" %} <span class="caret"></span></button>
                <ul class="dropdown-menu">
                {% if vocab is defined %}
                  {% for langcode in vocab.languages %}
                  <li><a href="#" class="lang-button" value="{{ langcode }}">{% trans langcode %}</a></li>
                  {% endfor %}
                {% else %}
                  <li><a href="#" class="lang-button" value="{{ lang }}">{% trans lang %}</a></li>
                {% endif %}
                  <li><a href="#" class="lang-button-all" value="anything">{% trans "Search language: any" %}</a></li>
                </ul>
              </div><!-- /btn-group -->
              <input id="search-vocab-parameter" type="text" class="form-control" name="q" value="{{ term }}">
              <div class="input-group-btn">
                <button id="search-all-button" type="submit" class="btn btn-primary">{% trans "Search" %}</button>
              </div>
            </div>
            <div id="search-from-all-vocabularies-radio-buttons">
              <input type="radio" name="all" id="all-languages-false" value="0"
              onClick="createCookie('ONKI_SEARCH_ALL', this.value , 365);" />
              <input type="radio"
              id="all-languages-true" name="all" value="1"
              onClick="createCookie('ONKI_SEARCH_ALL', this.value , 365);" />
            </div>
          </form>
        </div>
        {% endif %}
      </div>
      <!-- header-bar ENDS HERE -->

      <!-- Sidebar -->

      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse">
        <div class="side-nav-buttons">
        </div>
        <ul class="nav navbar-nav side-nav">
          {% block sidebar %}
          {% include 'hierarchy-bar.twig' %}
          {% endblock %}
        </ul>
      </div><!-- /.navbar-collapse -->
    </nav>

    <div id="page-wrapper">
      {% block content %}
      {% include 'vocabularylist.twig' %}
      {% endblock %}
      <footer id="footer"></footer>
    </div><!-- /#page-wrapper -->
  </div><!-- /#wrapper -->

</body>
</html>
